import request from '@/utils/request'

// 查询采购退货单列表
export function listBuyBackOrder(query) {
  return request({
    url: '/caigou/buyBackOrder/list',
    method: 'get',
    params: query
  })
}

// 财务收款单页面查询采购退货单列表
export function listForReciveOrder(query) {
  return request({
    url: '/caigou/buyBackOrder/listForReciveOrder',
    method: 'get',
    params: query
  })
}


// 查询采购退货单列表
export function listAll() {
  return request({
    url: '/caigou/buyBackOrder/listAll',
    method: 'get',
  })
}

// 查询采购退货单详细
export function getBuyBackOrderById(id) {
  return request({
    url: '/caigou/buyBackOrder/' + id,
    method: 'get'
  })
}

// 新增采购退货单
export function addBuyBackOrder(data) {
  return request({
    url: '/caigou/buyBackOrder',
    method: 'post',
    data: data
  })
}

// 修改采购退货单
export function updateBuyBackOrder(data) {
  return request({
    url: '/caigou/buyBackOrder',
    method: 'put',
    data: data
  })
}

// 删除采购退货单
export function delBuyBackOrder(id) {
  return request({
    url: '/caigou/buyBackOrder/' + id,
    method: 'delete'
  })
}
